# encoding: UTF-8
import re  

#'\">(.*) </a'
def gogo():
	f=open('58com.cityU.txt')
	d =open("58comURL.list",'w')
	for line in f:
		u = re.search(r'href=\"([\w|:|//\.]+)\"',line)
		n = re.search(r'\">(.*)</a',line)
		if not u :
			continue
		print u.group(1), n.group(1)
		d.write("urlmap_58com[\""+n.group(1)+"\"]"+"=\""+u.group(1)+"\";\n")

def HelloWorld():
	print "Hello World!"
	
if __name__=="__main__":
	gogo()
	HelloWorld()
